<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>

var arr=[1,2,3,4]
var obj={
    name:'zs',
    age:12,
    gender:'男'
}
var date=new Date()
var reg=new RegExp()
console.log(typeof arr);
console.log(typeof obj);
console.log(typeof  date);
console.log(typeof reg);

//采用精准的检测数据的方法
console.log(Object.prototype.toString.call(arr));
console.log(Object.prototype.toString.call(obj));
console.log(Object.prototype.toString.call(date));
console.log(Object.prototype.toString.call(reg));


//es5新增检测方法,适用于检测数组,
var brr=[12,34]
console.log(Array.isArray(brr));
// console.log(Object.isObject(obj));//报错


//instanceof 原理利用的是对象的prototype是否能在被检测对象的原型链上找到

var crr=[1,2,3,4]
console.log(crr instanceof Array);
console.log(crr instanceof Object);
// console.log(instanceof(Array));
//eval函数
eval('var a=1')
console.log(a);

var o={
    name:'zs',
    gender:'男'
}
 var a =                                                
 console.log(typeof(4));
 var crr=[1,2,3]
//  console.log(crr.pop())
crr.pop()
crr.pop()
 console.log(crr)
</script>

</html>